<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%
String path = request.getContextPath();  
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
	<base href="<%=basePath%>">
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
	<title>预警日志</title>
</head>

<body>
	<div style="width:100%;">
		<h2>预警日志</h2>
		<div style="width:400px; display: inline-block; float: left; ">
			<table class="table table-bordered table-hover">
				<thead>
					<tr>
						<th>设备编号</th>
						<th>预警等级</th>	
						<th>预警时间</th>
						<th>处理情况</th>
					</tr>
				</thead>
				<tbody>
					<c:if test="${list != null}">
					<c:forEach items="${list}" var="item"> 
					<tr> 
						<td>${item.deviceNum}</td>
						<td>${item.rankName}</td>
						<td>${item.time}</td>
						<td>${item.status}</td>
					</tr>
					</c:forEach>
					</c:if>
				</tbody>
				<tfoot>
	            <tr>
	                <td colspan="4">
	                <div class="pagination">
	    			<a href="javascript:void(0);" onclick="alert_log(1)">第一页</a>
	    			<a href="javascript:void(0);" onclick="alert_log(${currPage-1})">上一页</a>
	    			<a href="javascript:void(0);" onclick="alert_log(${currPage+1})">下一页</a>
	    			<a href="javascript:void(0);" onclick="alert_log(${totalPage})">最末页</a>
	    			${currPage}/${totalPage}页,共${totalRows}个项目
	    			</div>
	    			</td>
	            </tr>
	        </tfoot>
			</table>
		</div>
	</div>
</body>
</html>